import { useSelector } from "react-redux"
import { StateType } from "../store"
const useGetQuestion = ()=>{
    const {selectedId,componentList,copyComponent} = useSelector((state:StateType)=>state.Component_Reducer.present)
    const selectedComponent =  componentList.find((c)=>{
        return c.fe_id === selectedId
    })
    return {
        selectedId,
        componentList,
        selectedComponent,
        copyComponent
    }
}

export default useGetQuestion